<template>
    <view>
        <image src="/static/易用.png" mode="scaleToFill" class="easyuse-background" />
    </view>
    <view class="easyuse-title">Easyuse易用——一站式迎新系统 </view>
    <view style="height: 50px;">
        <view class="code-title">账号</view>
        <view><input class="codeInput" v-model="newCode" placeholder="使用学号注册" @click="saveCode(newCode)" /></view>
    </view>
    <view style="margin-top: 50px;height: 60px;">
        <view class="code-title">密码</view>
        <view ><input class="codeInput" type="text" v-model="newPassword"
                placeholder="初始密码为身份证后六位" @click="savePassword(newPassword)" /></view>
        <view>
            <image src="/static/眼睛图标.png" mode="scaleToFill" class="eyeIcon"  />
        </view>
    </view>
<view class="findPassword">
<switch style="transform: scale(0.8,0.75)" class="switch-style" />
<span style="color: #f8a435;margin-left: 60px;font-size: 13px;margin-top: 25px;" > 记住账号密码</span>
<view    style="color: #f8a435;right: 10vw;position: absolute;
font-size: 13px;margin-top: 25px;"> 忘记密码？</view> 
</view>

<view v-if="show===false" class="permission-div" @click="isShow"><image
    src="/static/未同意.png"  class="permission-img"
/></view>
<view v-if="show===true" class="permission-div" @click="isShow"><image
    src="/static/已同意.png"  class="permission-img"
/></view>
<view class="loginDiv">
    <button  class="loginButton"  hover-class="button-hover"
        @click="toWelcome"
 >   登录
    </button>
    <image
        src="/static/登录箭头.png"  class="login-img" />
</view>
</template>

<script setup lang="ts">
import { easyuseData } from './home';
const { CodeStore, newCode, newPassword, saveCode,
    savePassword, isShow, show,toWelcome ,} = easyuseData();
</script>

<style lang="scss" scoped>
@import './home.scss'
</style>